<script setup lang="ts">
function gotoList() {
  uni.navigateTo({
    url: "../../subpkg/ChargeDetails/ChargeDetails",
  });
}
function gotoRelation() {
  uni.navigateTo({
    url: "../../subpkg/Relation/Relation",
  });
}
function gotoInfomation() {
  uni.navigateTo({
    url: "../../subpkg/Infomation/Infomation",
  });
}
</script>
<template>
  <div class="home">
    <div class="home-function">
      <div class="home-ditu">
        <uni-icons
          type="chatboxes"
          size="30"
          @click="gotoInfomation"
        ></uni-icons>
      </div>
      <div class="home-search">
        <view class="uni-form-item uni-column"
          ><input class="uni-input" focus placeholder="地址/充电站名称"
        /></view>
      </div>
      <div class="home-saoma" @click="gotoRelation">
        <uni-icons
          custom-prefix="service"
          type="icon-kefu"
          size="30"
          color="#777777"
        ></uni-icons>
      </div>
    </div>
    <div class="home-list">
      <ul>
        <li class="home-list-li" @click="gotoList">
          <div class="home-list-top">
            <text style="font-size: 32rpx; font-weight: 600"
              >美华智充水口充电站</text
            >
            <text style="font-size: 28rpx">59KM</text>
          </div>
          <div class="home-list-center">
            <div class="home-list-center-img">
              <img
                src="@/static/images/intelligent-image.png"
                alt=""
                class="img"
              />
            </div>
            <div class="home-list-center-introduce">
              <p class="home-p">地址：东莞市大良镇水口村银朗南路402号</p>
              <p class="home-p">数量：14个</p>
              <p class="home-p">资费：直流1.05-1.45元/度</p>
              <p class="home-p">运营：正常营业</p>
            </div>
          </div>
          <div class="home-list-footer">
            <div class="state" style="background-color: #4bbe9f">有空闲</div>
            <div class="state" style="background-color: #efab2e">24小时</div>
            <div class="state" style="background-color: #ee6c6c">对外开放</div>
            <div class="state" style="background-color: #6dc0f8">可充大巴</div>
            <div>
              <uni-icons type="phone" size="30"></uni-icons>
            </div>
            <div>
              <uni-icons type="paperplane" size="30"></uni-icons>
            </div>
          </div>
        </li>
        <li class="home-list-li">
          <div class="home-list-top">
            <text style="font-size: 32rpx; font-weight: 600"
              >美华智充水口充电站</text
            >
            <text style="font-size: 28rpx">59KM</text>
          </div>
          <div class="home-list-center">
            <div class="home-list-center-img">
              <img
                src="@/static/images/intelligent-image.png"
                alt=""
                class="img"
              />
            </div>
            <div class="home-list-center-introduce">
              <p class="home-p">地址：东莞市大良镇水口村银朗南路402号</p>
              <p class="home-p">数量：14个</p>
              <p class="home-p">资费：直流1.05-1.45元/度</p>
              <p class="home-p">运营：正常营业</p>
            </div>
          </div>
          <div class="home-list-footer">
            <div class="state" style="background-color: #4bbe9f">有空闲</div>
            <div class="state" style="background-color: #efab2e">24小时</div>
            <div class="state" style="background-color: #ee6c6c">对外开放</div>
            <div class="state" style="background-color: #6dc0f8">可充大巴</div>
            <div>
              <uni-icons type="phone" size="30"></uni-icons>
            </div>
            <div>
              <uni-icons type="paperplane" size="30"></uni-icons>
            </div>
          </div>
        </li>
        <li class="home-list-li">
          <div class="home-list-top">
            <text style="font-size: 32rpx; font-weight: 600"
              >美华智充水口充电站</text
            >
            <text style="font-size: 28rpx">59KM</text>
          </div>
          <div class="home-list-center">
            <div class="home-list-center-img">
              <img
                src="@/static/images/intelligent-image.png"
                alt=""
                class="img"
              />
            </div>
            <div class="home-list-center-introduce">
              <p class="home-p">地址：东莞市大良镇水口村银朗南路402号</p>
              <p class="home-p">数量：14个</p>
              <p class="home-p">资费：直流1.05-1.45元/度</p>
              <p class="home-p">运营：正常营业</p>
            </div>
          </div>
          <div class="home-list-footer">
            <div class="state" style="background-color: #4bbe9f">有空闲</div>
            <div class="state" style="background-color: #efab2e">24小时</div>
            <div class="state" style="background-color: #ee6c6c">对外开放</div>
            <div class="state" style="background-color: #6dc0f8">可充大巴</div>
            <div>
              <uni-icons type="phone" size="30"></uni-icons>
            </div>
            <div>
              <uni-icons type="paperplane" size="30"></uni-icons>
            </div>
          </div>
        </li>
        <li class="home-list-li">
          <div class="home-list-top">
            <text style="font-size: 32rpx; font-weight: 600"
              >美华智充水口充电站</text
            >
            <text style="font-size: 28rpx">59KM</text>
          </div>
          <div class="home-list-center">
            <div class="home-list-center-img">
              <img
                src="@/static/images/intelligent-image.png"
                alt=""
                class="img"
              />
            </div>
            <div class="home-list-center-introduce">
              <p class="home-p">地址：东莞市大良镇水口村银朗南路402号</p>
              <p class="home-p">数量：14个</p>
              <p class="home-p">资费：直流1.05-1.45元/度</p>
              <p class="home-p">运营：正常营业</p>
            </div>
          </div>
          <div class="home-list-footer">
            <div class="state" style="background-color: #4bbe9f">有空闲</div>
            <div class="state" style="background-color: #efab2e">24小时</div>
            <div class="state" style="background-color: #ee6c6c">对外开放</div>
            <div class="state" style="background-color: #6dc0f8">可充大巴</div>
            <div>
              <uni-icons type="phone" size="30"></uni-icons>
            </div>
            <div>
              <uni-icons type="paperplane" size="30"></uni-icons>
            </div>
          </div>
        </li>
        <li class="home-list-li">
          <div class="home-list-top">
            <text style="font-size: 32rpx; font-weight: 600"
              >美华智充水口充电站</text
            >
            <text style="font-size: 28rpx">59KM</text>
          </div>
          <div class="home-list-center">
            <div class="home-list-center-img">
              <img
                src="@/static/images/intelligent-image.png"
                alt=""
                class="img"
              />
            </div>
            <div class="home-list-center-introduce">
              <p class="home-p">地址：东莞市大良镇水口村银朗南路402号</p>
              <p class="home-p">数量：14个</p>
              <p class="home-p">资费：直流1.05-1.45元/度</p>
              <p class="home-p">运营：正常营业</p>
            </div>
          </div>
          <div class="home-list-footer">
            <div class="state" style="background-color: #4bbe9f">有空闲</div>
            <div class="state" style="background-color: #efab2e">24小时</div>
            <div class="state" style="background-color: #ee6c6c">对外开放</div>
            <div class="state" style="background-color: #6dc0f8">可充大巴</div>
            <div>
              <uni-icons type="phone" size="30"></uni-icons>
            </div>
            <div>
              <uni-icons type="paperplane" size="30"></uni-icons>
            </div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<style lang="less">
:not(not) {
  box-sizing: border-box;
}
.home {
  width: 100vw;
  height: 100vh;

  .home-function {
    width: 100%;
    height: 100rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    z-index: 9999;
    background-color: #e0e7f0;

    .home-ditu {
      margin-left: 20rpx;
    }

    .home-search {
      .uni-input {
        width: 550rpx;
        height: 75rpx;
        text-align: center;
        border-radius: 30px;
        background-color: #ffffff;
      }
    }

    .home-saoma {
      margin-right: 20rpx;
    }
  }

  .home-list {
    width: 100%;
    position: absolute;
    top: 100rpx;
    background-color: #e0e7f0;

    .home-list-li {
      margin-bottom: 10rpx;
      padding-left: 20rpx;
      padding-right: 20rpx;
      background-color: #ffffff;
      list-style: none;

      .home-list-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 90rpx;
        border-bottom: 1px solid #e0e7f0;
      }

      .home-list-center {
        height: 240rpx;
        display: flex;
        justify-content: space-between;
        padding-top: 20rpx;
        border-bottom: 1px solid #e0e7f0;

        .home-list-center-img {
          width: 200rpx;
          height: 200rpx;

          .img {
            width: 200rpx;
            height: 200rpx;
          }
        }

        .home-list-center-introduce {
          font-size: 24rpx;

          .home-p {
            margin-bottom: 10rpx;
          }
        }
      }

      .home-list-footer {
        height: 90rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;

        .state {
          width: 120rpx;
          height: 60rpx;
          font-size: 24rpx;
          color: #ffffff;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 15rpx;
        }
      }
    }
  }
}
</style>
